/**   
* @Title: UserArea.java 
* @Package netgloo.models 
* @Description: TODO(用一句话描述该文件做什么) 
* @author osbornjonny@126.com   
* @date 2017年6月29日 下午4:07:53 
* @version V1.0   
*/  
package netgloo.models;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/** 
* @ClassName: UserArea 
* @Description: TODO(这里用一句话描述这个类的作用) 
* @author osbornjonny@126.com 
* @date 2017年6月29日 下午4:07:53 
*  
*/
@Entity
@Table(name="user_area")
public class UserArea {
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;
	
	private String address;
	@ManyToOne(cascade={CascadeType.PERSIST})
	@JoinColumn(name="user_id")
	private User user;
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
}
